const useRole = "stu";
const permission = {
  mounted(el, binding) {
    let _useRole = binding.value;
    // 假设目前我只支持传数组
    let _have =
      typeof _useRole == "string"
        ? _useRole === useRole
        : _useRole.includes(useRole);
    // 如果没有权限就隐藏
    if (!_have) {
      el.parentNode && el.parentNode.removeChild(el);
    }
  },
};
export default permission;
